Skip to content

3.8.1 (Patch): Return 301 for Nested Topics#8

Merged
JeremyCaney merged 6 commits intomasterfrom
develop
Jul 16, 2018
Merged

3.8.1 (Patch): Return 301 for Nested Topics#8
JeremyCaney merged 6 commits intomasterfrom
develop

Conversation

@JeremyCaney
Copy link
Copy Markdown
Member

Currently, when a user requests a Nested Topic, they will be routed to the TopicController, which won't be able to process the request since, by design, Nested Topics aren't associated with views. To mitigate this, the patch will instead return a 403 error as part of a validation filter in the TopicController class. This is a more appropriate error, and will make it easier to filter these out when analyzing log files in e.g. Application Insights.

`GitVersionTask` is an *MSBuild* task that will automatically set the `Attribute*Version` properties in any compiled assemblies based on the *Git Flow* versioning system. In this model, the version will be based on a) the branch name, and/or b) previously set tags. The versions are expected to follow *Semantic Versioning* (SemVer).
By default, `GitVersion` writes out the fully-qualified SemVer 2.0 version to the DLLs. If the `nuspec` uses `$version$` it will thus inherit this. Unfortunately, VSTS doesn't currently support SemVer 2.0 format URLs (even though *NuGet* itself does). As such, the build server passes in a custom property, `SemVer`, which sets the value to the `LegacySemVerPadded` variable. This will ensure compatibility is maintained with the VSTS Package Manager.
Also, changed `AssemblyInfo` to use "Ignia" not "Ignia, LLC" so it doesn't show up as two different authors in the `nuspec` file.
Badges include:
- Build status (includes tests)
- Deployment status
- NuGet version
Nested Topics are not (currently) intended to be accessed directly. If a request is made directly to a nested topic, it should be rejected. This accomplishes this by returning a 403 on requests to a nested topic or its container (based on the `ContentType` being set to `List`).
Previously, the `controller` key was being set to the `area` variable. This didn't cause any bugs because neither `area` nor `controller` is being actively used. To prevent future bugs, however, am making sure this is set correctly.
@JeremyCaney JeremyCaney added the Type: Bug Behavior that is inconsistent with documented or expected behavior. label Jul 16, 2018
@JeremyCaney JeremyCaney requested a review from ktrunkey July 16, 2018 21:57
@JeremyCaney JeremyCaney merged commit 5b38908 into master Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Behavior that is inconsistent with documented or expected behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants